package dbPhase.hypeerweb;
/**
 * Null_Node is just an extension of Node and is representing a "null" node.
 *
 *@pre Domain:<br>
 *		NULL_NODE is a Null_Node initialized to null.
 */

public class Null_Node extends Node {

	private static Null_Node NULL_NODE = null;

	/**
	 * Null_Node is a private constructor so only one null node is created.
	 * @pre id is -1
	 *
	 * @param id - the id of the node should always be -1 than calls super to construct.
	 */
	private Null_Node(int id) {
		super(id);
		// TODO Auto-generated constructor stub
	}

	/**
	 * Simply returns the one instance of the Null_Node class or creates the one instance it there isn't one.
	 */
	public static Null_Node getSingleton() {
		if (NULL_NODE == null) {
			NULL_NODE = new Null_Node(-1);
		}
		return NULL_NODE;
	}

}
